<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: root
  Date: 2020/12/17
  Time: 16:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>


<%
    List<HttpSession> sessionList = (List<HttpSession>) application.getAttribute("sessionList");

%>
<h3>当前在线人数:<%=sessionList.size()%></h3>

<table cellpadding="0" cellspacing="0" border="1" width="90%">

    <tr>
        <td>序号</td>
        <td>登录时间</td>

    </tr>

    <%
        int index = 0;
        for (HttpSession httpSession : sessionList) {
    %>
    <tr>
        <td><%=++index%></td>
        <td><%=httpSession.getCreationTime()%></td>
    </tr>

    <%
        }
    %>

</table>


</body>
</html>